package com.zb.serviceimpl;

import java.util.List;

import com.zb.dao.HelpDao;
import com.zb.daoimpl.HelpDaoImpl;
import com.zb.entity.Help;
import com.zb.entity.Mr;
import com.zb.service.HelpService;
import com.zb.util.PageUtil;

public class HelpServiceImpl implements HelpService{
	private HelpDao helpService=new HelpDaoImpl();
	public PageUtil<Help> getHelpPage(Integer index, String carnum) {
		PageUtil<Help> page = new PageUtil<Help>();
		
		List<Help> list = helpService.getHelpList(index, page.getSize(),
				carnum);
		int count = helpService.getHelpCount(carnum);

		page.setCount(count);
		page.setData(list);
		page.setIndex(index);
		return page;
	}

	public void addHelp(Help h) {
		// TODO Auto-generated method stub
		helpService.addHelp(h);
	}

	public void updateHelp(Help h) {
		// TODO Auto-generated method stub
		helpService.update(h);
	}

	public void delHelp(int id) {
		// TODO Auto-generated method stub
		helpService.delHelp(id);
	}

	public Help getHelpById(int id) {
		// TODO Auto-generated method stub
		return helpService.getHelpById(id);
	}

}
